package cn.itcast.cd.domain;

import java.util.List;

public class ProductDir{
	
	private Long id;
	private String sn;
	private String name;
	private String intro;
	private String dirPath;   /*男装(001)-> 成人(0010) @001@0010    
																休闲装(0011) @001@0010@0011
										       					职业装(0012) @001@0010@0012
										    
							   select obj from productDir obj where obj.dirPath like @001%*/
	
	private ProductDir parent;
	private List<ProductDir> children = new java.util.ArrayList<ProductDir>();
	
	private Integer sequence;

	public Long getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public String getIntro() {
		return intro;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}

	public ProductDir getParent() {
		return parent;
	}

	public List<ProductDir> getChildren() {
		return children;
	}

	public Integer getSequence() {
		return sequence;
	}

	public void setParent(ProductDir parent) {
		if (parent == null || !parent.getId().equals(this.id))
			this.parent = parent;
	}

	public void setChildren(List<ProductDir> children) {
		this.children = children;
	}

	public void setSequence(Integer sequence) {
		this.sequence = sequence;
	}

	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}

	public String getDirPath() {
		return dirPath;
	}

	public void setDirPath(String dirPath) {
		this.dirPath = dirPath;
	}
}
